Skip to main content

Flagger

Flagger is a progressive delivery tool that automates the release process for applications running on Kubernetes. It reduces the risk of introducing a new software version in production by gradually shifting traffic to the new version while measuring metrics and running conformance tests. In simple words Flagger is a tool that integrates with Kubernetes, and enables automated deployments and make it one step closer to a continuous deployment process and was designed to give developers confidence in automating production releases with progressive delivery techniques. Flagger also shrinks the threat of a new software version in production by moving traffic to the new software version while measuring and running tests on metrics and conformance.

Flagger implements several deployment strategies (Canary releases, A/B testing, Blue/Green mirroring) using a service mesh (App Mesh, Istio, Linkerd, Open Service Mesh) or an ingress controller (Contour, Gloo, NGINX, Skipper, Traefik) for traffic routing. For release analysis, Flagger can query Prometheus, Datadog, New Relic, CloudWatch or Graphite and for alerting it uses Slack, MS Teams, Discord, Rocket and Google Chat.

Flagger is Apache 2.0 (opens new window)licensed and was initially developed in 2018 at Weaveworks by Stefan Prodan. In 2020 Flagger became a Cloud Native Computing Foundation (opens new window)project, part of Flux (opens new window)family of GitOps tools.

Flagger overview

Flagger can be configured with Kubernetes custom resources and is compatible with any CI/CD solutions made for Kubernetes and since Flagger is declarative and reacts to Kubernetes events, it can be used in GitOps pipelines together with tools like Flux, JenkinsX, Carvel, Argo, etc. Also Flagger can be configured to automate the release process for Kubernetes workloads with a custom resource named canary. The canary custom resource defines the release process of an application running on Kubernetes and is portable across clusters, service meshes and ingress providers. Flagger implements a control loop that gradually shifts traffic to the canary while measuring key performance indicators like HTTP requests success rate, requests average duration and pods health. Based on the set thresholds, a canary is either promoted or aborted and its analysis is pushed to a Slack channel.

Getting started:

To get started with Flagger, choose one of the supported routing providers and install Flagger with Helm or Kustomize. After installing Flagger, you can follow anyone of these tutorials to get started:

Service mesh tutorialsIngress controller tutorialsHands-on GitOps workshops
IstioContourIstio
LinkersGlooLinkerd
AWS App MeshNGING IngressAWS App Mesh
Open Service MeshSkipper Ingressโž–
โž–Traefikโž–

Advantages:

  • Safer Releases - Reduce the risk of introducing a new software version in production by gradually shifting traffic to the new version while measuring metrics like HTTP/gRPC request success rate and latency.
  • Flexible Traffic Routing - Shift and route traffic between app versions using a service mesh like Istio, Linkerd, OSM or AWS App Mesh or if a service mesh does not meet our needs, use an Ingress controller like Contour, Gloo, NGINX, Skipper or Traefik.
  • Extensible Validation - Besides the builtin metrics checks, we can extend our application analysis with custom metrics and webooks for running acceptance tests, load tests, or any other custom validation.

Conributing:

If anyone interested in being a contributor and want to get involved in contributing, can see development guide for details on submitting patches and the contribution workflow.

References: